keywords: ip pbx voip gateway gsm gateway

×

Notice

The forum is in read only mode.
× Questions about VS-GW2120/GW1600/GW1202 and WGW1002G GSM Series VoIP Gateway

Config files auto recovery

7 years 7 months ago #11191 by crystal.han
Hi,
You can customize dial rules extensions_custom.conf file.
1. add the following in /etc/asterisk/gw/custom.sh file: echo> /etc/asterisk/extensions_routing.conf
  asterisk -rx "core reload"




 2. Finally, execute the command: / my_tools / sync2flash


For more help,you can add my skype:crystalhan6.
The following user(s) said Thank You: zveruga
7 years 7 months ago #11192 by zveruga

1. add the following in /etc/asterisk/gw/custom.sh file: echo> /etc/asterisk/extensions_routing.conf

This will erase extensions_routing.conf and I will be able to create contexts [gsm-N] in extensions_custom.conf, am I right?

2. Finally, execute the command: / my_tools / sync2flash

What ectually do this command?
7 years 7 months ago #11193 by crystal.han
1.yes,you are right
2.This command is configured to prevent lost after restart
7 years 7 months ago #11195 by zveruga
I add echo> /etc/asterisk/extensions_routing.conf in /etc/asterisk/gw/custom.sh
but when I restart asterisk or restart OS nothing happnes - file /etc/asterisk/extensions_routing.conf not cleared.
I use last firmware version 2.3.1
# cat /etc/asterisk/gw/custom.sh
#!/bin/sh
echo> /etc/asterisk/extensions_routing.conf
7 years 7 months ago #11196 by crystal.han
1.Please define your own dialing rules in the configuration file /etc/asterisk/gw/custom.sh
2.A space echo and> in line, you need to execute the command / my_tools / sync2flash then reboot to take effect
7 years 7 months ago - 7 years 7 months ago #11198 by zveruga
I have change a file /etc/asterisk/gw/custom.sh to folowed version:
#!/bin/sh
echo ""> /etc/asterisk/extensions_routing.conf
echo "qqq">/etc/asterisk/test # I add this line for testing
but extensions_routing.conf still with content after reboot asterisk or reboot OS. I think file extensions_routing.conf recovered after execute custom.sh becouse file /etc/asterisk/test has created so script executed on startup.
When I run /etc/asterisk/gw/custom.sh in ssh consloe - it execute noraml: extensions_routing.conf is clean and /etc/asterisk/test created with content qqq.
Time to create page: 0.043 seconds
Powered by Kunena Forum